﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string[] lines = new string[4];
        string s = ".";
        
        lines = TextBox1.Text.Split(s.ToCharArray(), 4);
        Label2.Text = "合法 ";
        for (int i = 0; i < 4; i++)
        {
            if (Convert.ToInt32(lines[i]) >= 255 || Convert.ToInt32(lines[i]) < 0)
            {
                Label2.Text = "不合法 ";
            }
        }
    }
}
